<% form_for(@product,:url=>procate_products_path(0),:html=>{:multipart=>true}) do |f| -%>
  <%= f.error_messages %>
  <table class="operate">
    <tr><td><%= f.label :name,"品名"%></td>
    <td> <%= f.text_field :name %></td></tr>
    <tr><td><%= f.label :procate_id,"产品类别"%></td>
    <td> <%= f.collection_select :procate_id,Procate.all(:conditions=>"parent_id is not null"),:id,:description %></td></tr>
    <tr><td> <%= label_tag "mainimage" ,"产品图片"%></td>
    <td> <%= file_field_tag "img",:accept=>"image/gif,image/jpeg,image/png" %></td></tr>
    <tr><td> <%= f.label :short_description,"简短描述" %></td>
    <td><%= f.text_field :short_description %></td></tr>
    <tr><td> <%= f.label :price,"零售价格" %></td>
    <td> <%= f.text_field :price %></td></tr>
    <tr><td><%= f.label :now_price,"本站价格" %></td>
    <td>  <%= f.text_field :now_price %></td></tr>
    <tr><td> <%= f.label :pro_order,"排序顺序" %></td>
    <td><%= f.text_field :pro_order %></td></tr>
    <% fields_for @pro_content do |f1|%>
      <tr><td><%= f1.label :package,"产品包装"%></td> <td>
 <%=render :partial=>"/articles/online_editor",:locals=>{:hidden_name=>"pro_content[package]",:content=>@pro_content.package ,:identity_id=>"pro_package"} %>
    </td></tr>
      <tr><td><%= f1.label :service,"产品服务"%></td> <td>
 <%=render :partial=>"/articles/online_editor",:locals=>{:hidden_name=>"pro_content[service]",:content=>@pro_content.service ,:identity_id=>"pro_service"} %>
</td></tr>
      <tr><td><%= f1.label :content,"产品内容"%></td>
        <td>
          <%=render :partial=>"/articles/online_editor",:locals=>{:hidden_name=>"pro_content[content]",:content=>@pro_content.content ,:identity_id=>"pro_content"} %>
      </td></tr>

    <% end %>


    <tr><td colspan="2"> <%= f.submit "提交" %></td></tr>
  </table>
<% end -%>